﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace LoveEat.MODEL
{
    public class PageFilter
    {
        //新的分页方法的参数
        /// <summary>
        /// 当前页数
        /// </summary>
        private int _pageIndex;

        public int PageIndex
        {
            get
            {
                return _pageIndex > 0 ? _pageIndex : 1;
            }
            set { _pageIndex = value; }
        }
        /// <summary>
        /// 开始记录页数
        /// </summary>
        public int StartRecordIndex { get; set; }
        /// <summary>
        /// 最后记录页数
        /// </summary>
        public int EndRecordIndex { get; set; }
        /// <summary>
        /// 页大小
        /// </summary>
        private int _pageSize;
        public int PageSize
        {
            get
            {
                if (_pageSize == 0)
                {
                    _pageSize = 10;
                }
                return _pageSize;
            }
            set { _pageSize = value; }
        }
        /// <summary>
        /// 数据总条数
        /// </summary>
        public int TotalItemCount { get; set; }
        //共多少页数
        public int TotalPageCount { get; set; }
    }
}
